package com.iscas.tech.service;

import com.iscas.tech.entity.AtStpic;
import com.iscas.tech.param.AtStpicPageParam;
import com.iscas.tech.vo.AtStpicQueryVo;
import io.geekidea.springbootplus.framework.common.service.BaseService;
import io.geekidea.springbootplus.framework.pagination.Paging;

import java.util.List;

/**
 * 科技成果图片信息表 服务类
 *
 * @author yangyi
 * @since 2020-10-26
 */
public interface AtStpicService extends BaseService<AtStpic> {

    /**
     * 保存
     *
     * @param atStpic
     * @return
     * @throws Exception
     */
    boolean saveAtStpic(AtStpic atStpic) throws Exception;

    /**
     * 修改
     *
     * @param atStpic
     * @return
     * @throws Exception
     */
    boolean updateAtStpic(AtStpic atStpic) throws Exception;

    /**
     * @param ids ID字符串，以","分隔
     * @return 删除科技成果图片
     * @throws Exception 删除异常
     */
    boolean deleteTechPic(String ids) throws Exception;


    /**
     * 获取分页对象
     *
     * @param atStpicPageParam
     * @return
     * @throws Exception
     */
    Paging<AtStpicQueryVo> getAtStpicPageList(AtStpicPageParam atStpicPageParam) throws Exception;

    /**
     * @param techGainId  科技成果ID
     * @param techPicType {@link com.iscas.tech.bo.TechPicType}科技成果图片分类
     * @return 获取科技成果下属所有图片
     * @throws Exception 查询异常
     */
    List<AtStpicQueryVo> getByGainId(Integer techGainId, Integer techPicType) throws Exception;

    /**
     * @param techGainId 科技成果ID
     * @throws Exception 删除异常
     */
    void deleteByGainId(Integer techGainId) throws Exception;
}
